package com.ruipengkj.view.orderView.dish.cooking;


/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 12-8-1
 * Time: 下午2:14
 * To change this template use File | Settings | File Templates.
 */
public class Test {
    public static void main(String[] args)
    {
        //初始化数据
        CommodityExeAttrMgr ceam = CommodityExeAttrMgr.getInstance();
        CommodityExeAttrs ceas = new CommodityExeAttrs();
        CommodityExeAttr cea = new CommodityExeAttr("spicy", "辣味", CommodityExeAttr.EXE_ATTR_TYPE_SINGLE_CHOOSE);
        cea.addOption(new CommodityExeAttrOption("spicy0", "加辣"));
        cea.addOption(new CommodityExeAttrOption("spicy1", "微辣"));
        cea.addOption(new CommodityExeAttrOption("spicy2", "不辣"));
        ceas.addAttr(cea);
        cea = new CommodityExeAttr("Garlic", "蒜", CommodityExeAttr.EXE_ATTR_TYPE_SINGLE_CHOOSE);
        cea.addOption(new CommodityExeAttrOption("spicy0", "正常"));
        cea.addOption(new CommodityExeAttrOption("spicy1", "多蒜"));
        ceas.addAttr(cea);
        ceam.addCommodityExeAttrs("Commodity1", ceas);

        //正式使用
        CommodityExeAttrs aeas = CommodityExeAttrMgr.getInstance().getCommodityExeAttrs("Commodity1");
        if(aeas != null)//有口味选择
        {
            //显示在界面上
        }
        //数据保存在TBillDetail的备注字段中，格式为：
        //spicy:spicy0;Garlic:spicy1
        //表示该客户选择的是“辣味:加辣;蒜:多蒜”
        //在订单显示和打印时要能正确的显示和打印出来
    }
}
